﻿using Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;
using ppt = Microsoft.Office.Interop.PowerPoint;
using Office = Microsoft.Office.Core;

namespace Microsoft.Office.PowerPoint.STAMP.Core
{
    internal static class SelectionChangeProcessor
    {
        /// <summary>
        /// Processes the selection change events and updates the UI button states.
        /// </summary>
        /// <param name="sel">The current selection in the application.</param>
        internal static void HandleSelectionChange(Selection sel)
        {
            if (sel.Type == PpSelectionType.ppSelectionShapes)
            {
                if (sel.ShapeRange.Type == MsoShapeType.msoMedia)
                {
                    // defer the update to the buttons based on the ribbon get enabled
                    StampRibbon.ForceInvalidate();
                }
            }
        }
    }
}